package com.i2works.smartluolong.web.dal.company.dao;

import com.i2works.smartluolong.utils.basecommon.BaseCommonDAO;
import com.i2works.smartluolong.utils.exception.DAOException;
import com.i2works.smartluolong.web.entity.company.CompanyApplyMemberDO;
import com.i2works.smartluolong.web.entity.company.CompanyApplyMemberQuery;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * 工商申请 - 公司成员持久层接口
 *
 * @author Liu Yutao <koal@vip.qq.com>
 * @date 2018/3/14 17:31
 */
@Mapper
@Repository("companyApplyMemberDAO")
public interface ICompanyApplyMemberDAO extends BaseCommonDAO<CompanyApplyMemberQuery, CompanyApplyMemberDO> {

    /**
     * 后台查询股东信息（返回股东身份）
     */
    List<CompanyApplyMemberDO> queryShareHolderList(CompanyApplyMemberQuery query) throws DAOException;

    /**
     * 删除（根据applyId,角色，身份）
     */
    void deleteByItemParam(CompanyApplyMemberQuery query) throws DAOException;


    /**
     * 根据applyId + user.role 删除股东信息
     */
    void deleteShareholderByRole(CompanyApplyMemberQuery query) throws DAOException;

    /**
     * 后台查询股东/法人/代办人信息
     *
     * @param query    查询参数
     * @param distinct 是否去重
     */
    @Deprecated
    List<CompanyApplyMemberDO> queryComplementMemberList(CompanyApplyMemberQuery query) throws DAOException;

    /**
     * 后台查询董事、监事、经理信息
     *
     * @param query    查询参数
     * @param distinct 是否去重
     */
    List<CompanyApplyMemberDO> querySupervisorMemberList(CompanyApplyMemberQuery query) throws DAOException;


    /**
     * 查询短信通知人的电话列表（法人和代办人）
     */
    Set<String> querySmsList(CompanyApplyMemberQuery query) throws DAOException;
}
